package com.kkb.kkbportal.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Range;
import org.hibernate.validator.constraints.URL;

import javax.validation.constraints.Digits;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 内推
 * </p>
 *
 * @author ${author}
 * @since 2021-08-11
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "Recommend对象", description = "内推信息")
public class Recommend implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "内推信息主键id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "公司名")
    @NotBlank(message = "公司名不能为空")
    private String companyName;

    @ApiModelProperty(value = "公司状态 0：未上市 1：已上市")
    @Range(min = 0, max = 1, message = "公司状态不存在")
    @NotNull(message = "公司状态不能为空")
    private Integer companyIsListed;

    @ApiModelProperty(value = "公司规模 0：0-200人 1：200-500人 2：500-1000人 3：1000-10000人 4:10000人以上")
    @Range(min = 0, max = 4, message = "公司规模不存在")
    @NotNull(message = "公司规模不能为空")
    private Integer companySize;

    @ApiModelProperty(value = "公司图标（url）")
    @NotBlank(message = "公司图标（url）不能为空")
    @URL(message = "公司图标必须是url格式")
    private String companyLogo;

    @ApiModelProperty(value = "职位名称")
    @NotBlank(message = "公司图标（url）不能为空")
    @URL(message = "公司图标必须是url格式")
    private String positionName;


    @ApiModelProperty(value = "职位最小月薪")
    @NotNull(message = "职位最小月薪不能为空")
    @Digits(integer = 8, fraction = 2, message = "职位最小月薪格式不正确")
    private BigDecimal positionSalaryMin;

    @ApiModelProperty(value = "职位最大月薪")
    @NotNull(message = "职位最大月薪不能为空")
    @Digits(integer = 8, fraction = 2, message = "职位最大月薪不正确")
    private BigDecimal positionSalaryMax;

    @ApiModelProperty(value = "职位月薪薪资发放数量")
    @NotNull(message = "职位月薪薪资发放数量不能为空")
    private Integer positionSalaryNum;

    @ApiModelProperty(value = "职位工作城市")
    @NotBlank(message = "职位工作城市不能为空")
    private String positionCity;

    @ApiModelProperty(value = "职位工作所属区")
    @NotBlank(message = "职位工作所属区不能为空")
    private String positionDistrict;

    @ApiModelProperty(value = "职位工作详细地址")
    @NotBlank(message = "职位工作详细地址不能为空")
    private String positionAddress;

    @ApiModelProperty(value = "职位要求最小年限")
    @NotNull(message = "职位要求最小年限不能为空")
    @Digits(integer = 1, fraction = 2, message = "职位要求最小年限格式不正确")
    private BigDecimal positionMinYear;

    @ApiModelProperty(value = "职位要求最大年限")
    @NotNull(message = "职位要求最大年限不能为空")
    @Digits(integer = 1, fraction = 2, message = "职位要求最大年限格式不正确")
    private BigDecimal positionMaxYear;

    @ApiModelProperty(value = "职位要求学历")
    @NotBlank(message = "职位要求学历不能为空")
    private String positionEducation;

    @ApiModelProperty(value = "标签（多个用英文逗号隔开）")
    @NotBlank(message = "标签不能为空")
    private String tags;

    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "更新时间")
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "0:未删除 其它(id):已删除")
    @TableLogic(delval = "id")
    private Long isDeleted;
}
